package com.raychi.demo.util;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.raychi.demo.entity.Product;

public class ProductUtil {
	
	public static Product createProduct(ResultSet rs) throws SQLException {
		Product product;
		product = new Product();
		product.setName(rs.getString("name"));
		product.setPrice(rs.getFloat("price"));
		product.setId(rs.getInt("id"));
		return product;
	}
}
